<?php
/*
 * Created on 31 mars 07
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
 class Post extends appModel{
 	var $name = 'Post';
 	
 	var $validate = array(
 					'title' => VALID_NOT_EMPTY,
 					'slug' => VALID_NOT_EMPTY,
 					'content' => VALID_NOT_EMPTY
 					);
 					
 	var $belongsTo = array('User' => array(
 								'className' => 'User',
 								'conditions' => '',
 								'order' => '',
 								'foreignKey' => 'user_id'
 								)
 							);
 							
 	var $hasMany = array('Comment' => array(
 								'className' => 'Comment',
 								'conditions' => '',
 								'order' => '',
 								'foreign_key' => 'post_id'
 								)
 							);
 }
?>
